Skip to content

fix: fix funk version#3

Merged
kooksee merged 1 commit intomasterfrom
feat/v2
Nov 3, 2025
Merged

fix: fix funk version#3
kooksee merged 1 commit intomasterfrom
feat/v2

Conversation

@kooksee
Copy link
Copy Markdown
Contributor

@kooksee kooksee commented Nov 3, 2025

No description provided.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @kooksee, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request modernizes the project's dependency management by updating the Go version and various libraries, including a significant shift in error handling practices. It also refactors the OpenAPI documentation generation and serving infrastructure, moving UI-related configuration and routing to a dedicated templates package for clearer separation of concerns. These changes aim to improve maintainability, leverage newer Go features, and streamline the project's architecture.

Highlights

  • Go Version and Dependency Updates: The Go version in go.mod has been upgraded from 1.20 to 1.23. Key dependencies like kin-openapi were updated, goccy/go-json and github.com/pubgo/funk were removed, and github.com/samber/lo was introduced, leading to a significant cleanup of indirect dependencies in go.sum.
  • Refactoring of OpenAPI Configuration and Routing: The Config struct and related routing logic (InitRouter, OpenapiDataHandler) were moved from the opendoc package to a new templates package. The Swagger struct in opendoc now directly manages its Title, Description, and Version fields, simplifying its structure.
  • Improved Error Handling: The github.com/pubgo/funk/assert library has been replaced with standard log.Panic or slog.Error for critical errors and github.com/samber/lo for 'must' operations, leading to more idiomatic Go error handling.
  • New Build and Example Targets: A Makefile was added, introducing vet for static analysis and run-example for easily executing the example application. A .version file was also added, setting the project version to v0.1.1.
  • Enhanced Security Provider Typing: The security package now uses a new AuthProviderType enum for defining security scheme providers, replacing simple strings for better type safety and clarity.
  • Added Tag Management: New AddTags methods were introduced to both opendoc/Operation and opendoc/Service structs, allowing for better organization and categorization of API endpoints.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a significant refactoring that replaces the pubgo/funk dependency with samber/lo and standard library functions. This is a great improvement for the project, reducing external dependencies and using more idiomatic Go. The changes also include moving template-related logic to a separate package, which improves code organization.

However, the refactoring has introduced a critical issue where the OpenAPI specification's title is no longer set. I've also identified a breaking change in the opendoc.New function that is not documented and affects how users of this library will create new Swagger objects. My review includes suggestions to address these points. Additionally, I've provided a minor suggestion to improve a panic message for better debuggability.

@kooksee kooksee merged commit 2957119 into master Nov 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant